home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWStream / Sources / SLASinks.cpp < prev    next >
Encoding:
Text File  |  1996-04-25  |  3.6 KB  |  126 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLASinks.cpp
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFound.hpp"
  11.  
  12. #ifndef FWODEXCE_H
  13. #include "FWODExce.h"
  14. #endif
  15.  
  16. #ifndef FWPRIMEM_H
  17. #include "FWPriMem.h"
  18. #endif
  19.  
  20. #ifndef FWPRIDEB_H
  21. #include "FWPriDeb.h"
  22. #endif
  23.  
  24. #define VARIABLE_MACROS
  25. #define FW_OSink_Class_Source
  26. #include "SLASinks.xih"
  27.  
  28. #ifdef FW_BUILD_MAC
  29. #pragma segment FWStream
  30. #endif
  31.  
  32. //----------------------------------------------------------------------------------------
  33. // FW_OSinkGetReadableBytes
  34. //----------------------------------------------------------------------------------------
  35.  
  36. SOM_Scope long  SOMLINK FW_OSink__GetReadableBytes(FW_OSink* somSelf, Environment* ev)
  37. {
  38. FW_UNUSED(somSelf);
  39. FW_UNUSED(ev);
  40.     FW_SUBCLASS_RESPONSIBILITY("FW_OSinkGetReadableBytes");
  41.     return 0;
  42. }
  43.  
  44.  
  45. //----------------------------------------------------------------------------------------
  46. // FW_OSinkRead
  47. //----------------------------------------------------------------------------------------
  48.  
  49. SOM_Scope void  SOMLINK FW_OSink__Read(FW_OSink *somSelf, Environment *ev,
  50.         void* destination,
  51.         long count)
  52. {
  53. FW_UNUSED(somSelf);
  54. FW_UNUSED(ev);
  55. FW_UNUSED(destination);
  56. FW_UNUSED(count);
  57.     FW_SUBCLASS_RESPONSIBILITY("FW_OSinkRead");
  58. }
  59.  
  60.  
  61. //----------------------------------------------------------------------------------------
  62. // FW_OSinkGetWritableBytes
  63. //----------------------------------------------------------------------------------------
  64.  
  65. SOM_Scope long  SOMLINK FW_OSink__GetWritableBytes(FW_OSink *somSelf, Environment *ev)
  66. {
  67. FW_UNUSED(somSelf);
  68. FW_UNUSED(ev);
  69.     FW_SUBCLASS_RESPONSIBILITY("FW_OSinkGetWritableBytes");
  70.     return 0;
  71. }
  72.  
  73. /*
  74.  *  ---- Optimized sink protocol
  75.  *  These four methods make it possible to optimize sink access
  76.  *  to buffered devices that can expose their buffer.
  77.  *  Sinks that are not buffered, or cannot expose their buffer
  78.  *  will not be able to take advantage of this protocol.  Such
  79.  *  sinks should not override these methods, as the default behavior
  80.  *  is correct in that case.
  81.  *  Note that the ODF Stream classes will take advantage of this
  82.  *  protocol for sinks that support it, but no other ODF classes
  83.  *  will, and it is not expected that these methods would be used
  84.  *  by other clients.  We could therefore grant friend access
  85.  *  to the streams classes and then declare these functions
  86.  *  to be private, but that seems unnecessarily restrictive.
  87.  */
  88.  
  89.  
  90. //----------------------------------------------------------------------------------------
  91. // FW_OSinkWrite
  92. //----------------------------------------------------------------------------------------
  93.  
  94. SOM_Scope void  SOMLINK FW_OSink__Write(FW_OSink *somSelf, Environment *ev,
  95.         void* source,
  96.         long count)
  97. {
  98. FW_UNUSED(somSelf);
  99. FW_UNUSED(ev);
  100. FW_UNUSED(source);
  101. FW_UNUSED(count);
  102.     FW_SUBCLASS_RESPONSIBILITY("FW_OSinkWrite");
  103. }
  104.  
  105.  
  106. //----------------------------------------------------------------------------------------
  107. // FW_OSinksomInit
  108. //----------------------------------------------------------------------------------------
  109.  
  110. SOM_Scope void  SOMLINK FW_OSink__somInit(FW_OSink *somSelf)
  111. {
  112.     FW_OSink_parent_SOMObject_somInit(somSelf);
  113. }
  114.  
  115.  
  116. //----------------------------------------------------------------------------------------
  117. // FW_OSinksomUninit
  118. //----------------------------------------------------------------------------------------
  119.  
  120. SOM_Scope void  SOMLINK FW_OSink__somUninit(FW_OSink *somSelf)
  121. {
  122.     FW_OSink_parent_SOMObject_somUninit(somSelf);
  123. }
  124.  
  125.  
  126.